package com.mxl.AOP;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Configuration;


@Slf4j
@Aspect
@Configuration
public class AcessAspect{
    @Pointcut("execution(* com.mxl.controller.*Controller.*(..))")
    public void methods(){
    }
    // 环绕
    @Around("methods()")
    void before(ProceedingJoinPoint joinPoint) throws Throwable {
        log.info(joinPoint.toString());
        Object ret = joinPoint.proceed();
        log.info(joinPoint.toString());
    }



}